//
//  AddressSelectView.h
//  AppointmentForCar
//
//  Created by TheMacBook on 2016/11/15.
//  Copyright © 2016年 Herron. All rights reserved.
//

#import <UIKit/UIKit.h>
@class AddressSelectView;
@class AddressItem;
@class AddressView;

@protocol AddressSelectViewDelegate <NSObject>
- (void)addressSelectClickOrigin:(AddressSelectView *)view;      // 选择起点
- (void)addressSelectClickDestination:(AddressSelectView *)view; // 选择终点
- (void)addressSelectNowCallCar:(AddressSelectView *)view;
@end
@protocol AddressViewDelegate <NSObject>
- (void)addressViewClickDestination:(AddressView *)view;
- (void)addressViewClickOrigin:(AddressView *)view;
- (void)addressNowCallCar:(AddressView *)view;
@end
@protocol AddressItemDelegate <NSObject>
- (void)addressDestinationClick:(AddressItem *)item;
- (void)addressOriginClick:(AddressItem *)item;
@end

@interface AddressSelectView : UIView <AddressViewDelegate>

@property (nonatomic , copy) NSString *origin;         // 出发点
@property (nonatomic , copy) NSString *destination;    // 终点
@property (nonatomic , assign) BOOL isDestination;

@property (nonatomic , assign) NSInteger type; ///< 1  起点 2 终点

@property (nonatomic , weak) id <AddressSelectViewDelegate> delegate;


@end

@interface AddressView : UIView <AddressItemDelegate>
@property (nonatomic , copy) NSString * origin;
@property (nonatomic , copy) NSString * destination;
@property (nonatomic , assign) BOOL isDestination;
@property (nonatomic , weak) id <AddressViewDelegate> delegate;

@end



@interface AddressItem : UIView
@property (nonatomic , assign) NSInteger type; ///< 1  起点 2 终点
@property (nonatomic , copy) NSString * content;
@property (nonatomic , weak) id <AddressItemDelegate> delegate;

@end
